<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>用户编辑</title>
<link rel="stylesheet" type="text/css" href="../js/util/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../js/util/easyui/themes/icon.css">

<script type="text/javascript" src="../js/util/jquery/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="../js/util/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../js/index/textbox.api.js"></script>
<script>   
  

function onSelectChanged(){
    var arrays=[
    [],
    ["无锡","南京"],         
    ["宁波","温州"],
   
    ];
    var indexer=0
    var level1=document.getElementById('province');
    var level1_options=level1.children;
    for(var i=level1_options.length-1;i>=0;i--){
    	var option=level1_options[i];
    	if(option.selected){
    		var id=option.id;

    		indexer=id;
    		break;
    	}
    }
    var level2=arrays[indexer];
    var html="";
    for (var i=0;i<=level2.length-1;i++){
    	var values=level2[i];

    	var option_html="<option>"+values+"</option>";
    	html=html+option_html;
    }
    var level2_select=document.getElementById('city')
    level2_select.innerHTML=html;
}
 
  </script>
</head>
<body>

<h1>个人信息编辑</h1>
<form action="../UserEditServlet" method="post">
<table >
  <tr>
            
                  <td ><input name="userid" type="hidden" class="easyui-validatebox" value="${user.userid}"  ></td>
                 
                </tr>
 <tr>
 <td></td><td><input id="id" type="hidden"  name="username" class="easyui-validatebox" value="${user.username}" data-options="required:true" validType="number"></td>
 </tr>
 <tr>
 
 
 <tr>
 <td>姓别:</td><td><input type="radio" class="sex" name="sex" value="男" checked="checked" > 男
                   <input type="radio" class="sex" name="sex" value="女" >女
                   <input type="radio" class="sex" name="sex" value="保密" >保密
 <td>
 </tr>
 <tr>
<td>年龄：</td><td><input type="text" name="age" class="easyui-validatebox" required="required"></td>
</tr>
  <tr>
           
                  <td >省份：
                   <select name="province" id="province"  onchange="onSelectChanged()">
                      <option id="0" value="省份" selected="selected" name="province">省份</option>
                      <option id="1" value="江苏" name="province" >江苏</option>
                       <option id="2" value="浙江"  name="province" >浙江</option>
                    </select></td>        
                  <td >城市：
                    <select name="city"  id="city" >
                    <option id="0"  value="市县" selected="selected">市县</option>
                     
                    </select>
                    </td>
 <tr>
 	<td>证件号码：</td><td><input class="easyui-validatebox" name="cardid" required="required"  validType="no" ></td>
 </tr>
 
 <tr>
              
                  <td>电话：</td>
                  <td ><input name="phonenum" type="text" class="easyui-validatebox" id="tel"  required="required"></td>
                </tr>
<tr>
<td>备注</td>
	<td>
		<textarea></textarea>
	</td>
</tr>
<tr><td></td><td><input class="options" type="checkbox" name="" required="required">我已阅读并同意遵守<a href="http://www.12306.cn/mormhweb/">《中国铁路客户服务中心网站服务条款》</a></td></tr>



<tr><td><input type="submit"  name="" value="提交"></td><td><input type="reset" value="重置"></td></tr>

</table>
</form>

</body>
</html>